package com.usaas.search.controller.app.index;

import com.usaas.common.core.controller.BaseController;
import com.usaas.common.core.domain.AjaxResult;
import com.usaas.search.dto.IndexSearchDto;
import com.usaas.search.service.app.AppPlatIndexService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 平台分类Controller
 *
 * @author Helios
 * @date 2024-08-14
 */
@RestController
@RequestMapping("/app/search/platIndex")
public class AppPlatIndexController extends BaseController {

    @Autowired
    private AppPlatIndexService appPlatIndexService;

    /**
     * 置顶搜索
     */
    @PostMapping("/indexSearch" )
    public AjaxResult indexSearch(@RequestBody IndexSearchDto indexSearchDto) {
        return appPlatIndexService.indexSearch(indexSearchDto);
    }


    /**
     * 轮播图
     */
    @PostMapping("/banners" )
    public AjaxResult banners(@RequestBody IndexSearchDto indexSearchDto) {
        return appPlatIndexService.banners(indexSearchDto);
    }


    /**
     * 滚动通知
     */
    @PostMapping("/rollingNotification" )
    public AjaxResult rollingNotification(@RequestBody IndexSearchDto indexSearchDto) {
        return appPlatIndexService.rollingNotification(indexSearchDto);
    }

    /**
     * 分类
     */
    @PostMapping("/categorys" )
    public AjaxResult categorys(@RequestBody IndexSearchDto indexSearchDto) {
        return appPlatIndexService.categorys(indexSearchDto);
    }

    /**
     * 平台推广
     */
    @PostMapping("/platformPromotion" )
    public AjaxResult platformPromotion(@RequestBody IndexSearchDto indexSearchDto) {
        return appPlatIndexService.platformPromotion(indexSearchDto);
    }

    /**
     * 每日推荐
     */
    @PostMapping("/dailyRecommendation" )
    public AjaxResult dailyRecommendation(@RequestBody IndexSearchDto indexSearchDto) {
        return appPlatIndexService.dailyRecommendation(indexSearchDto);
    }

    /**
     * 热门
     */
    @PostMapping("/hot" )
    public AjaxResult hot(@RequestBody IndexSearchDto indexSearchDto) {
        return appPlatIndexService.hot(indexSearchDto);
    }
    /**
     * 用户发布推荐列表
     */
    @PostMapping("/userPublishList" )
    public AjaxResult userPublishList(@RequestBody IndexSearchDto indexSearchDto) {
        return appPlatIndexService.userPublishList(indexSearchDto);
    }
}
